import { BrowserRouter, Routes, Route } from "react-router-dom";
import routes from "./router";

function App() {
  return (
    <BrowserRouter>
      <Routes>
        {routes.map(({ name, path, component: Comp }) => (
          <Route key={name} path={path} element={<Comp />}></Route>
        ))}
      </Routes>
    </BrowserRouter>
  );
}

export default App;
